function data_to_string(data) {
    let tmp = new FormData();
    for (var key in data) {
        if (typeof data[key] == "object") {
            tmp.append(key, JSON.stringify(data[key]))
        } else {
            tmp.append(key, data[key])
        }
    }
    return tmp
}
